<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页</title>
   <style>
   /* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 视口居中布局 */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background-color: #f4f4f4;
}

.login-container {
    /* 使用视口单位设置宽度 */
    width: 30vw;
    padding: 3vh;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h1 {
    margin-bottom: 2vh;
}

.login-container input {
    /* 使用视口单位设置输入框的高度 */
    height: 5vh;
    width: 100%;
    margin-bottom: 2vh;
    padding: 1vh;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.login-container button {
    /* 使用视口单位设置按钮的高度 */
    height: 5vh;
    width: 100%;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.login-container button:hover {
    background-color: #0056b3;
}
     </style>
</head>

<body>
    <div class="login-container">
        <h1>登录</h1>
        <form>
            <input type="text" placeholder="用户名">
            <input type="password" placeholder="密码">
            <button type="submit">登录</button>
        </form>
    </div>
</body>

</html>